<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学生信息列表</title>
<style type="text/css">
.welcome {
	background-color: #DDFFDD;
	border: 1px solid #009900;
	width: 1200px;
	margin: auto;
	top: 15;
	left: 0;
	right: 0;
	left: 0;
}

.welcome li {
	list-style: none;
}
</style>
</head>
<body>
	<h1>
		<center>学生信息列表</center>
	</h1>
	<s:if test="hasActionMessages()">
		<div class="welcome">
			<s:actionmessage />
		</div>
	</s:if>
	<table align="center">
		<tr align=right>
			<td>当前登录账号：<s:property value="#session.currentUserAccount" />
				&nbsp;&nbsp;&nbsp;&nbsp;<a href="createstudentpage.jsp">新建学生信息</a>&nbsp;&nbsp;&nbsp;&nbsp;  <a href="login!logout.action">退出登录</a></td>
		</tr>
		<tr>
			<td>
				<table align="center" style="width: 1200px;">
					<tr style="background-color:#778899">
						<td><s:property value="'ID'" />
						</td>
						<td><s:property value="'姓名'" />
						</td>
						<td><s:property value="'学号'" />
						</td>
						<td><s:property value="'性别'" />
						</td>
						<td><s:property value="'身高'" />
						</td>
						<td><s:property value="'系部'" />
						</td>
						<td><s:property value="'专业'" />
						</td>
						<td><s:property value="'年级'" />
						</td>
						<td><s:property value="'班级'" />
						</td>
						<td><s:property value="'QQ'" />
						</td>
						<td><s:property value="'电话号码'" />
						</td>
						<td><s:property value="'创建时间'" />
						</td>
						<td><s:property value="'修改时间'" />
						</td>
						<td><s:property value="'操作'" />
						</td>
					</tr>
					<s:iterator value="StudentList" var="Student" status="st">
						<tr <s:if test="#st.odd"> style="background-color:#D3D3D3" </s:if>>
							<td><s:property value="#Student.id" />
							</td>
							<td><s:property value="#Student.studentName" />
							</td>
							<td><s:property value="#Student.studentNumber" />
							</td>
							<td><s:property value="#Student.sex" />
							</td>
							<td><s:property value="#Student.height" />
							</td>
							<td><s:property value="#Student.department" />
							</td>
							<td><s:property value="#Student.major" />
							</td>
							<td><s:property value="#Student.gradeId" />
							</td>
							<td><s:property value="#Student.classId" />
							</td>
							<td><s:property value="#Student.qqNumber" />
							</td>
							<td><s:property value="#Student.cellphone" />
							</td>
							<td><s:property
									value="%{getText('{0,date,yyyy-MM-dd HH:mm:ss}',{#Student.createdDate})}" />
							</td>
							<td><s:property
									value="%{getText('{0,date,yyyy-MM-dd HH:mm:ss}',{#Student.lastUpdateDate})}" />
							</td>
							<td><a
								href="studentpage!deleteStudent.action?studentId=${Student.id}&pageNo=<s:property value='pageNo'/>">删除</a>|
								<a href="studentpage!editStudent.action?studentId=${Student.id}&pageNo=<s:property value='pageNo'/>">修改</a>
							</td>
						</tr>
					</s:iterator>
					<tr style="background-color:#F5F5F5">
						<td colspan=14 align="right">当前页<s:property
								value="pageNo+'/'+pageCount" />&nbsp;&nbsp; 共<s:property
								value="rowCount" />条记录&nbsp;&nbsp;&nbsp;&nbsp; <a
							href="studentpage!listStudent.action?pageNo=1">[首页]</a>  <a
							href="studentpage!listStudent.action?pageNo=<s:property value="pageNo-1"/>">[上一页]</a> 
							<a
							href="studentpage!listStudent.action?pageNo=<s:property value="pageNo+1"/>">[下一页]</a> 
							<a
							href="studentpage!listStudent.action?pageNo=<s:property value="pageCount"/>">[尾页]</a>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>

